import request from '@/utils/request'
// import qs from 'qs'

/**
 * 薪资管理-管理列表-获取列表
 * url:'/hr/salaryMonth/make/submissionList'
 * method:GET
 * @Header Authorization: 登录接口返回的token
 * @Query params:{
    page: 1, // 当前页数
    size: 20, // 每页个数
    sort: '', // 排序
    deptId: '', // 部门
    salaryMonth: '' // 发放月份
 * }
 * @returns {*}
 */
export const getSalaryListAPI = (params = {}) => {
  return request.get('/hr/salaryMonth/make/submissionList', {
    params
  })
}

/**
 * 薪资管理-管理列表-撤回审批
 * url:'/hr/salaryMonth/make/taskBack'
 * method:POST
 * @Header Authorization: 登录接口返回的token
 * @Query params:{}
 * @returns {*}
 */
export const backApproveAPI = (params = {}) => {
  return request.post('/hr/salaryMonth/make/taskBack', params)
}

/**
 * 薪资管理-管理列表-删除
 * url:'/hr/salaryMonth/make/${submissionId}'
 * method:DELETE
 * @Header Authorization: 登录接口返回的token
 * @Query params:{}
 * @returns {*}
 */
export const deleteSalaryAPI = (params = {}) => {
  return request.delete(`/hr/salaryMonth/make/${params.id}`, params)
}
